package com.ungao.tools.generator.connection;

import java.sql.ResultSet;
import java.sql.ResultSetMetaData;

public interface IConnection extends AutoCloseable {

    /**
     * 获取数据库表信息
     *
     * @param tableName
     * @return
     * @throws Exception
     */
    ResultSet tables(String tableName) throws Exception;

    /**
     * 获取数据库表键信息
     *
     * @param tableName
     * @return
     * @throws Exception
     */
    ResultSet primaries(String tableName) throws Exception;

    /**
     * 获取数据库表列信息
     *
     * @param tableName
     * @return
     * @throws Exception
     */
    ResultSet columns(String tableName) throws Exception;

    /**
     * 获取数据库表列信息
     *
     * @param tableName
     * @return
     * @throws Exception
     */
    ResultSetMetaData info(String tableName) throws Exception;
}
